#ifndef MAINWINDOW_H
#define MAINWINDOW_H

#include <QMainWindow>
#include <QThread>
#include "LoginPage.h"
#include "LoginDialog.h"
#include "TCPClient.h"
#include "MainMenu.h"
#include "Registration.h"
QT_BEGIN_NAMESPACE
namespace Ui { class MainWindow; }
QT_END_NAMESPACE

class MainWindow : public QMainWindow
{
    Q_OBJECT

public:
    MainWindow(QWidget *parent = nullptr);
    ~MainWindow();

private slots:
    void on_pushButton_clicked();
    void receiveTimeout(QString reason);
    void creatMainMenu();
protected:

private:
    Ui::MainWindow *ui;
    QRect screenGeometry;//屏幕大小
    LoginPage *loginPage=nullptr;

    TCPClient *mTCPClient=nullptr;
    QThread TCPClientThread;

    MainMenu *myMainMenu=nullptr;
    Registration *myRegistration=nullptr;

};
#endif // MAINWINDOW_H
